from gc_analysis import *

lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
#lst = [11]
print(lst)
rst = RunningStoppedTimes(lst)
#unit_per_sec = 1e7
unit_per_sec = 1
running, stopped, combine = rst.running_time(), rst.stopped_time(), rst.total_time()
print('running (sec) = ', running / unit_per_sec)
print('stopped (sec) = ', stopped / unit_per_sec)
print('combine (sec) = ', combine / unit_per_sec)
if combine != 0:
    print('running   (%) = ', running * 1e2 / combine)
    print('stopped   (%) = ', stopped * 1e2 / combine)

print('accumulated mutator time')
for i in range(rst.total_time() + 1):
    print(i, rst.accumulated_mutator_time(i), sep='\t')

print('minimun mutator utilization')
for i in range(1, rst.total_time() + 1):
#    print(i)
    mmt = rst.minimum_mutator_time(i)
#    print(mmt, mmt / i, sep='\t')
    print(i, mmt, sep='\t')
#    print()
